package com.example.springioc.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;

/**
 * ClassName: LoggerController
 * Package: IntelliJ IDEA
 * Description:
 *
 * @Author 谷京京
 * @Create 2023/11/12 21:33
 * @Version 1.0
 */
@Slf4j
@RestController
public class LoggerController {

    @PostConstruct
    public void print() {
        System.out.println("打印日志");
        log.info("=========日志框架打印的日志==========");
        log.warn("=========warn==========");
        log.error("==========error===============");
        log.debug("==========debug===========");
        log.info("=========info============");
        log.trace("=============trace==============");
    }
}
